const { defineConfig } = require('@vue/cli-service')
const { VantResolver } = require('unplugin-vue-components/resolvers')
const ComponentsPlugin = require('unplugin-vue-components/webpack')

module.exports = defineConfig({
  transpileDependencies: true,
  // 配置 文件
  configureWebpack: {
    // 路径，别名
    resolve: {
      // 别名
      alias: {
        // 文件夹名:配置的别名
        assets: '@/assets',
        components: '@/components',
        views: '@/views',
      },
    },
    // vant3 配置
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()],
      }),
    ],
  },
})
